#ifndef MY_RENDER_VECTOR2
#define MY_RENDER_VECTOR2

#include"./dot.hpp"

class Vector2{
    public:
    float x;
    float y;
    Vector2(float x,float y):x(x),y(y){}
    Vector2():x(0),y(0){}
    Vector2 operator+(Vector2 v){
        return Vector2(x+v.x,y+v.y);
    }
    Vector2 operator-(Vector2 v){
        return Vector2(x-v.x,y-v.y);
    }
    Vector2 operator*(float f){
        return Vector2(x*f,y*f);
    }
    // 这是点乘
    Vector2 operator*(Vector2 v){
        return Vector2(x*v.x,y*v.y);
    }
    // 这是叉乘
    float operator^(Vector2 v){
        return y*v.x-x*v.y;
    }
    Vector2(Dot dot){
        x=dot.x;
        y=dot.y;
    }
};




#endif